package org.video.mine.entity;

import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;

import org.video.mine.utils.DataUtils;

import java.io.Serializable;

public class LookHistoryEntity extends BaseObservable implements Serializable {
    String name;
    String imgUrl;
    String playUrl;
    int allTimes;
    int which;
    int position;
    int playPosition;
    boolean isLoaded;

    @Bindable
    public boolean isLoaded() {
        return isLoaded;
    }

    public void setLoaded(boolean loaded) {
        isLoaded = loaded;
    }

    @Bindable
    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    @Bindable
    public int getWhich() {
        return which;
    }

    public void setWhich(int which) {
        this.which = which;
    }

    @Bindable
    public String getPlayUrl() {
        return playUrl;
    }

    public void setPlayUrl(String playUrl) {
        this.playUrl = playUrl;
    }

    @Bindable
    public int getAllTimes() {
        return allTimes;
    }

    public void setAllTimes(int allTimes) {
        this.allTimes = allTimes;
    }

    @Bindable
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Bindable
    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    @Bindable
    public int getPlayPosition() {
        return playPosition;
    }

    @Bindable
    public String getPlayPositionStr(){
        return DataUtils.timeToString(playPosition);
    }

    @Bindable
    public String getAllTimeStr(){
        return DataUtils.timeToString(allTimes);
    }

    public void setPlayPosition(int playPosition) {
        this.playPosition = playPosition;
    }
}
